﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace SportsStore.Web.Models.Category
{
  public class CategoriesViewModel
  {
    public CategoriesViewModel()
    {
    }

    private List<CategoryViewModel> _categories = new List<CategoryViewModel>();

    public List<CategoryViewModel> Categories
    {
      get { return _categories; }
      set { _categories = value; }
    }

    public string CurrentCategory { get; set; }

    public void AddCategories(IEnumerable<string> names)
    {
      foreach (var name in names)
      {
        var ctv = new CategoryViewModel(name);
        Categories.Add(ctv);
      }
    }
  }
}